<!DOCTYPE html>
<html lang="en">
<head>
	<{include file="header.html"}>
	<title>组卷管理-<{$user_data['school_name']}>-德安信会计在线教育平台</title>
	<style>
	.type_span{padding:3px 6px; border:1px solid red;}
	.selected{background-color:red};
	</style>
</head>
<body>
<div class="mainContainer line-all">
	<form class="layui-form layui-form-pane1" method="post" action="">
		<label class="layui-form-label">筛选班级</label>
		<div class="layui-input-inline">
			<input class="layui-input" name="start_time" value="<{if $start_time|default:0 != 0}><{$start_time}><{/if}>" required lay-verify="required" placeholder="开始日" id="LAY_demorange_s">
		</div>
		<div class="layui-input-inline">
			<input class="layui-input" name="end_time" value="<{if $end_time|default:0 != 0}><{$end_time}><{/if}>" required lay-verify="required" placeholder="截止日" id="LAY_demorange_e">
		</div>
		<div class="layui-input-inline">
			<input type="submit" class="layui-btn layui-btn-normal" value="筛选" />
		</div>
	</form>
	<hr>
	<form class="layui-form " method="post" action="/tiku/save_volume_publish">
		<input type="hidden" name="volume_id" value="<{$volume_id|default:0}>"/>
		<input type="hidden" name="type" value="<{$type|default:0}>"/>
		<div class="item m-b10 add_step">
			<div class="layui-form-item">
				<label class="layui-form-label"><{if $type|default:0 == 4}>考试<{else}>作业<{/if}>名称</label>
				<div class="layui-input-block">
					<input type="text" name="name" id="name" value="" class="layui-input" />
				</div>
			</div>

			<div class="layui-form-item">
				<label class="layui-form-label"><{if $type|default:0 == 4}>考试<{else}>作业<{/if}>时长</label>
				<div class="layui-input-block">
					<input type="text" name="timeout" value="" class="layui-input" />
				</div>
			</div>

			<div class="layui-form-item">
				<label class="layui-form-label">发布至</label>
				<{if isset($classes) AND $classes|count > 0}>
                <{foreach from=$classes item=item}>
                <input name="classes[]" <{if $class_list|is_array AND $item.id|in_array:$class_list}>checked<{/if}> class="type_1 type_span" title="<{$item.class_name}>" value="<{$item.id}>" type="checkbox" />
                <{/foreach}>
                <{/if}>
            </div>

			<!-- <div class="layui-form-item">
	      		<label class="layui-form-label">考试时间</label>
		      	<div class="layui-inline" style="margin-right: 0px;">
		        	<input type="text" name="start_time" id="start_time" lay-verify="required|date" placeholder="yyyy-mm-dd hh:mm:ss" autocomplete="off" class="layui-input" value="" onclick="layui.laydate({elem: this,min: laydate.now(), format: 'YYYY-MM-DD hh:mm:ss', istime: true})">
		      	</div>
		      	-
		      	<div class="layui-inline">
		        	<input type="text" name="end_time" id="end_time" lay-verify="required|date" placeholder="yyyy-mm-dd hh:mm:ss" autocomplete="off" class="layui-input" value=""  istime: true})">
		      	</div>
		    </div> -->

		    <div class="layui-form-item layui-form-text">
                <label class="layui-form-label">老师提示</label>
                <div class="layui-input-block">
                    <textarea class="layui-textarea" id="prompt" name="prompt"></textarea>
                </div>
            </div>

			<div class="layui-input-block">
				<input type="submit" class="layui-btn" id="select_subject" value="发布" />
			</div>
		</div>
	</form>
</div>
<{include file="footer.html"}>
<script>
<{if isset($ok) && $ok == 1}>
	<{if $error == 0}>
		var index = parent.layer.getFrameIndex(window.name); //先得到当前iframe层的索引
		parent.layer.close(index);
		parent.$('#now').text('已发布到<{if $type|default:0 == 4}>考试<{else}>作业<{/if}>中心');
		parent.layer.msg('发布成功', {
	        icon: 6,
	        shade:0.5,
	        time: 2000 //2秒关闭（如果不配置，默认是3秒）
	    });
	    <{else}>
	    parent.layer.msg('<{$msg}>', {
	        icon: 5,
	        shade:0.5,
	        time: 2000 //2秒关闭（如果不配置，默认是3秒）
	    });
	    <{/if}>
    <{/if}>
</script>

<script>
	layui.use(['form','laydate','jquery'], function(){
		var laydate = layui.laydate;
		var form = layui.form(),$ = layui.jquery;

		var start = {
			min: '2011-11-31 23:59:59'
			,max: laydate.now(+1)
			,istoday: false
			,choose: function(datas){
				end.min = datas; //开始日选好后，重置结束日的最小日期
				end.start = datas //将结束日的初始值设定为开始日
			}
		};

		var end = {
			min: '2011-11-31 23:59:59'
			,max: laydate.now(+1)
			,istoday: false
			,choose: function(datas){
				start.max = datas; //结束日选好后，重置开始日的最大日期
			}
		};

		document.getElementById('LAY_demorange_s').onclick = function(){
			start.elem = this;
			laydate(start);
		}
		document.getElementById('LAY_demorange_e').onclick = function(){
			end.elem = this
			laydate(end);
		}
	});
</script>
<!-- <script src="/static/school/js/add_test_volume.js" type="text/javascript"></script> -->
</body>
</html>